import base.AppMemory;
import helper.Proxy;
import view.WeatherView;
import view.mh.WeatherGUI;
import controller.Actions;
import controller.Controller;
import controller.ControllerException;

/**
 * JWeatherstation wird gestartet
 * @author Alfa
 *
 */
public class JWeatherstationRun {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		/**
		 * Konfigurationsdaten in AppMemory setzen
		 */
		if (!AppMemory.loadConfig()) {
			System.exit(0);
		}
		Proxy.setProxy();

		// Controller instanzieren und Views hinzufügen
		Controller controller = new Controller();
		try {
			// TODO Bernd Taube WeatherView zum Testen
			//controller.addView( new WeatherView(controller) );
			controller.addView( new WeatherGUI(controller) );
			
			controller.actionPerformed(Actions.GET_COUNTRIES);
		} catch (ControllerException e) {
			e.printStackTrace();
		}
	}

}
